package com.zanox.statistics.hbase.colfamsbuilding.algo.core;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

import com.zanox.statistics.hbase.colfamsbuilding.algo.types.Query;

public class Constants{
	public static boolean isELog = false;
	static String EVOLUTION_LOG_NAME = "eLog";
	public static Log eLog = new Log (Constants.EVOLUTION_LOG_NAME);
	static String LOG_FILE_NAME = "log";	
	static String Curve_FILE_NAME = "curve";
	static String Weight_FILE_NAME = "datasets//weight";

	
//	static String Query_FILE_NAME = "bigQueries";

	static String Training_QueryPrototypes_FILE_NAME = "datasets//LearningDatasets/Training";
	static String Validation_QueryPrototypes_FILE_NAME = "datasets//LearningDatasets/Validate";
	static String Testing_QueryPrototypes_FILE_NAME = "datasets//LearningDatasets/Testing";
	
	static int Init_Duplicate =1 ;
	static int ITERATION = 500;
	static int colFamNum_MAX = 4;
	//static int NUM_Queries = 3293;
	
	static float FACTOR_ColFamConsume = 4;
	static float FACTOR_Duplicate = (float) 1;
	static float FACTOR_Skew = 1;
	static float FACTOR_ColFamNum = (float) 0.1;
	static float FACTOR_LoadBalance = (float) 0.1;
	
	static float FACTOR_Alpha = 10; // for natrual selection 
	
	static float RATE_evolutionRate = (float) 0.30;
	static float RATE_CopulateRate = (float) 0.05;
	static float RATE_mutationRate = (float) 0.2;
	static float RATE_crossOverRate = (float) 0.2;
	static float RATE_crossOver2Rate = (float) 0;
	static float RATE_splitUpRate = (float) 0.02;
	static float RATE_mergeRate = (float) 0.02;
	
	static int NUM_MutationMaxAttNum = 3;
	static int NUM_OriginPopulationSize = 100;
	//static ArrayList<Query> queryPrototypes = new ArrayList<Query>();
	static int NUM_AttributeSize = 109;
	static AttWeights weight = new AttWeights();
	static {		
		try {
			weight.getWeightsFromFile(Weight_FILE_NAME, ",", 1);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String attributes = 
		//"PPS_COUNT_REJECTED, PPS_AMOUNT_TRACKED_REJECTED, PPS_COMMISSION_REJECTED, PPS_COUNT_OPEN, PPS_AMOUNT_TRACKED_OPEN, PPS_COMMISSION_OPEN, PPS_FEE_OPEN, PPS_COUNT_APPROVED, PPS_AMOUNT_TRACKED_APPROVED, PPS_COMMISSION_APPROVED, PPS_COUNT_CONFIRMED, PPS_AMOUNT_TRACKED_CONFIRMED, PPS_COMMISSION_CONFIRMED, PPL_COUNT_CONFIRMED, PPL_COMMISSION_CONFIRMED, PPL_FEE_CONFIRMED, PPL_COUNT_OPEN, PPL_COMMISSION_OPEN, PPL_COUNT_APPROVED, PPL_COMMISSION_APPROVED, PPL_COUNT_REJECTED, PPL_COMMISSION_REJECTED, PPV_COUNT, PPC_COUNT, PPC_COMMISSION, PPV_COMMISSION, TPV_COUNT";
		"ADBOX_ID, USER_ID, PROG_ID, LINK_ID, LINK_FORMAT, WEBSITE_ID, CURRENCY_ID, TIME_STAMP, SHOW_TO_AFFILIATE, PARTNER_RETRIEVING, TCAT_ID, PPS_COUNT_REJECTED, PPS_AMOUNT_TRACKED_REJECTED, PPS_COMMISSION_REJECTED, PPS_FEE_REJECTED, PPS_TRACKED_TO_REJECTED_PERIOD, PPS_COUNT_OPEN, PPS_AMOUNT_TRACKED_OPEN, PPS_COMMISSION_OPEN, PPS_FEE_OPEN, PPS_TRACKED_TO_OPEN_PERIOD, PPS_AMOUNT_BOOKED_OPEN, PPS_COUNT_APPROVED, PPS_AMOUNT_TRACKED_APPROVED, PPS_COMMISSION_APPROVED, PPS_FEE_APPROVED, PPS_TRACKED_TO_APPROVED_PERIOD, PPS_AMOUNT_BOOKED_APPROVED, PPS_COUNT_CONFIRMED, PPS_AMOUNT_TRACKED_CONFIRMED, PPS_COMMISSION_CONFIRMED, PPS_FEE_CONFIRMED, PPS_TRACKED_TO_CONFIRMED_PERIOD, PPS_AMOUNT_BOOKED_CONFIRMED, PPS_AMOUNT_BOOKED_REJECTED, PPL_COUNT_CONFIRMED, PPL_COMMISSION_CONFIRMED, PPL_FEE_CONFIRMED, PPL_TRACKED_TO_CONFIRMED_PERIOD, PPL_COUNT_OPEN, PPL_COMMISSION_OPEN, PPL_FEE_OPEN, PPL_TRACKED_TO_OPEN_PERIOD, PPL_COUNT_APPROVED, PPL_COMMISSION_APPROVED, PPL_FEE_APPROVED, PPL_TRACKED_TO_APPROVED_PERIOD, PPL_COUNT_REJECTED, PPL_COMMISSION_REJECTED, PPL_FEE_REJECTED, PPL_TRACKED_TO_REJECTED_PERIOD, SUBA_PPS_COUNT_CONFIRMED, SUBA_PPS_AMOUNT_TRACKED_CONFIRMED, SUBA_PPS_COMMISSION_CONFIRMED, SUBA_PPS_FEE_CONFIRMED, SUBA_PPS_TRACKED_TO_CONFIRMED_PERIOD, SUBA_PPS_AMOUNT_BOOKED_CONFIRMED, SUBA_PPS_COUNT_OPEN, SUBA_PPS_AMOUNT_TRACKED_OPEN, SUBA_PPS_COMMISSION_OPEN, SUBA_PPS_FEE_OPEN, SUBA_PPS_TRACKED_TO_OPEN_PERIOD, SUBA_PPS_AMOUNT_BOOKED_OPEN, SUBA_PPS_COUNT_REJECTED, SUBA_PPS_AMOUNT_TRACKED_REJECTED, SUBA_PPS_COMMISSION_REJECTED, SUBA_PPS_FEE_REJECTED, SUBA_PPS_TRACKED_TO_REJECTED_PERIOD, SUBA_PPS_AMOUNT_BOOKED_REJECTED, SUBA_PPL_COUNT_OPEN, SUBA_PPL_COMMISSION_OPEN, SUBA_PPL_FEE_OPEN, SUBA_PPL_TRACKED_TO_OPEN_PERIOD, SUBA_PPS_COUNT_APPROVED, SUBA_PPS_AMOUNT_TRACKED_APPROVED, SUBA_PPS_COMMISSION_APPROVED, SUBA_PPS_FEE_APPROVED, SUBA_PPS_TRACKED_TO_APPROVED_PERIOD, SUBA_PPS_AMOUNT_BOOKED_APPROVED, SUBA_PPL_COUNT_CONFIRMED, SUBA_PPL_COMMISSION_CONFIRMED, SUBA_PPL_FEE_CONFIRMED, SUBA_PPL_TRACKED_TO_CONFIRMED_PERIOD, SUBA_PPL_COUNT_APPROVED, SUBA_PPL_COMMISSION_APPROVED, SUBA_PPL_FEE_APPROVED, SUBA_PPL_TRACKED_TO_APPROVED_PERIOD, SUBA_PPL_COUNT_REJECTED, SUBA_PPL_COMMISSION_REJECTED, SUBA_PPL_FEE_REJECTED, SUBA_PPL_TRACKED_TO_REJECTED_PERIOD, PPV_COUNT, PPC_COUNT, PPC_COMMISSION, PPC_COMMISSION_SUBA, PPC_FEE, PPV_COMMISSION, PPV_COMMISSION_SUBA, PPV_FEE, SUBA_PPV_COUNT, TPV_COUNT, SUBA_PPC_COUNT, SUBA_PPV_COMMISSION, SUBA_PPV_COMMISSION_SUBA, SUBA_PPV_FEE, SUBA_PPC_COMMISSION, SUBA_PPC_COMMISSION_SUBA, SUBA_PPC_FEE, SUBA_TPV_COUNT";
		
}